﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Torimi.Wiki.Web
{
	public partial class Default : System.Web.UI.Page
	{
		protected void Page_Load(object sender, EventArgs e)
		{
			
		}

		protected void btnReset_Click(object sender, EventArgs e)
		{
			Services.WikiInstance.ClearEverything();
		}

		protected void btnExport_Click(object sender, EventArgs e)
		{
			var settings = new Dictionary<string, string>();
			settings["DestinationFolder"] = @"C:\Temp\Wiki\";
			settings["FileName"] = string.Format("WikiExport-{0:yyyy-MM-dd-HH-mm-ss}.xml", System.DateTime.Now);

			Services.BackupService.PerformCompleteWikiBackup(settings, Services.WikiInstance);
		}
	}
}